# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1046.15.51 -> 1.1046.15.52 # kernel/fork.c 1.118.1.1 -> 1.118.1.2 # include/asm-ppc64/thread_info.h 1.7 -> 1.8 # include/asm-i386/thread_info.h 1.11 -> 1.12 # include/asm-ppc/thread_info.h 1.7 -> 1.8 # include/asm-parisc/thread_info.h 1.2 -> 1.3 # include/asm-um/thread_info.h 1.3 -> 1.4 # include/asm-h8300/thread_info.h 1.1 -> 1.2 # include/asm-v850/thread_info.h 1.2 -> 1.3 # include/asm-m68knommu/thread_info.h 1.2 -> 1.3 # include/asm-arm/thread_info.h 1.6 -> 1.7 # include/asm-m68k/thread_info.h 1.4 -> 1.5 # include/asm-s390/thread_info.h 1.4 -> 1.5 # include/asm-x86_64/thread_info.h 1.10 -> 1.10.1.1 # include/asm-sparc64/thread_info.h 1.10 -> 1.11 # arch/arm/kernel/process.c 1.28 -> 1.29 # include/asm-alpha/thread_info.h 1.5 -> 1.6 # include/asm-sparc/thread_info.h 1.4 -> 1.5 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.10 # [PATCH] PCI: Move more functions out of include/linux/pci.h that don't need to be there. # -------------------------------------------- # 03/06/04 yoshfuji@linux-ipv6.org 1.1046.213.14 # [IPV6]: typo, unrequired #undef and bad operator precedence. # - no need to #undef CONFIG_IPV6_SUBTREE # - use parentheses around "&" and "|". # - fib_repair_tree() is typo. # -------------------------------------------- # 03/06/04 hch@lst.de 1.1046.213.15 # [NET]: Kill useless/wrong Version line from net/core/dv.c # -------------------------------------------- # 03/06/04 hch@lst.de 1.1046.213.16 # [NET]: net/core/dst.c typo. # -------------------------------------------- # 03/06/04 hch@lst.de 1.1046.213.17 # [NET]: Fix coding style in net/core/filter.c # -------------------------------------------- # 03/06/04 hch@lst.de 1.1046.213.18 # [NET]: Fix coding style in net/core/iovec.c # -------------------------------------------- # 03/06/04 viro@parcelfarce.linux.theplanet.co.uk 1.1046.213.19 # [NET]: Move sk98lin driver away from init_etherdev(). # -------------------------------------------- # 03/06/04 viro@parcelfarce.linux.theplanet.co.uk 1.1046.213.20 # [NET]: Move 3c509 driver away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@kernel.bkbits.net 1.1046.214.1 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/06/04 rmk@flint.arm.linux.org.uk 1.1046.215.1 # [ARM] Fix more missing irqreturn_t and remove a static no_action func. # -------------------------------------------- # 03/06/04 herbert@gondor.apana.org.au 1.1046.213.21 # [IPSEC]: Include linux/slab.h where necessary. # -------------------------------------------- # 03/06/04 viro@parcelfarce.linux.theplanet.co.uk 1.1046.213.22 # [NET]: Move sunqe.c driver away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.213.23 # [NET]: Move arch/cris drivers away from init_etherdev(). # -------------------------------------------- # 03/06/04 viro@parcelfarce.linux.theplanet.co.uk 1.1046.213.24 # [NET]: Move bmac.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.213.25 # [NET]: Convert ia64 simeth.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.213.26 # [NET]: Convert PPC 8260_io/enet.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.213.27 # [NET]: Convert PPC 8260_io/fcc_enet.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.213.28 # [NET]: Convert PPC 8xx_io/enet.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.213.29 # [NET]: Convert PPC 8xx_io/fec.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.213.30 # [NET]: Actually apply Al's sunqe.c changes. # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1046.213.31 # [NET]: Fix thinkos in PPC 8260_io/fcc_enet.c changes. # -------------------------------------------- # 03/06/04 thomas@osterried.de 1.1046.213.32 # [AX25]: AX.25 bug fixes. # - Flxnet CRC handling fix for mkiss.c # - Use after free bug in ax25_ip.c # -------------------------------------------- # 03/06/04 davej@codemonkey.org.uk 1.1046.216.1 # [AGPGART] Report fixing of errata, and add missing printk stuff (\n's, KERN_INFO, PFX) # -------------------------------------------- # 03/06/04 davej@codemonkey.org.uk 1.1046.216.2 # [AGPGART] Kill useless printk in frontend. # This has served no useful purpose ever afaics. # -------------------------------------------- # 03/06/04 davej@codemonkey.org.uk 1.1046.216.3 # [AGPGART] Missing printk levels. # -------------------------------------------- # 03/06/04 torvalds@home.transmeta.com 1.1046.214.2 # Merge bk://linux-sam.bkbits.net/kbuild # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/04 rmk@flint.arm.linux.org.uk 1.1046.215.2 # [ARM] Move dma_alloc_coherent() to consistent.c # -------------------------------------------- # 03/06/04 davej@halogen.(none) 1.1046.217.1 # Merge halogen.(none):/home/davej/src/kernel/2.5/bk-linus # into halogen.(none):/home/davej/src/kernel/2.5/agpgart # -------------------------------------------- # 03/06/04 kai@tp1.ruhr-uni-bochum.de 1.1046.218.1 # Merge bk://linux-sam.bkbits.net/kbuild # into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make # -------------------------------------------- # 03/06/04 kai@tp1.ruhr-uni-bochum.de 1.1046.136.7 # Merge chaos:kernel/v2.5/linux-2.5.isdn # into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.isdn # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.11 # [PATCH] PCI: Grab reference count on pci_dev if the pci driver binds to the device. # # And remember to decrement the count after remove() is called. # -------------------------------------------- # 03/06/04 sam@mars.ravnborg.org 1.1046.214.3 # kbuild: Silence output with make 3.80 # # In the top-level makefile escaped two lines to avoid launching a second subshell. # This make the build a bit less verbose with make V=0 # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.12 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/core/memalloc.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.13 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/oss/esssolo1.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.14 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/oss/maestro.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.15 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/oss/via82cxxx_audio.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.16 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/pci/rme9652/hammerfall_mem.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.17 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/acpi/pci_irq.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.18 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/agp/amd-k8-agp.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.19 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/agp/generic.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.20 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/agp/isoch.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.21 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/hw_random.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.22 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/watchdog/amd7xx_tco.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.23 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/watchdog/i810-tco.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.24 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/ide/pci/cs5530.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.25 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/ide/pci/hp2366.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.26 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/ide/pci/pdc202xx_new.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.27 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/ide/setup-pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.28 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/macintosh/via-pmu.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.29 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/message/fusion/mptbase.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.30 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/message/i2o/i2o_core.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.31 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/net/e100/e100_main.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.32 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/net/e1000/e1000_main.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.33 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/net/ixgb/ixgb_main.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.34 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/parport/parport_pc.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.35 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/hotplug/ibmphp_core.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.36 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.37 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/proc.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.38 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/search.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.39 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/setup-irq.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.40 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pnp/resource.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.41 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/video/pm2fb.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.42 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/video/sis/sis_main.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.43 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/i386/pci/irq.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.44 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/i386/kernel/cpu/cpufreq/gx-suspmod.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1046.185.45 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/i386/pci/i386.c # -------------------------------------------- # 03/06/04 davidm@tiger.hpl.hp.com 1.1046.15.52 # Fix task creation/destruction to make it possible for the thread_info and the # task_struct to be next to each other. # -------------------------------------------- # diff -Nru a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c --- a/arch/arm/kernel/process.c Mon Sep 22 13:00:06 2003 +++ b/arch/arm/kernel/process.c Mon Sep 22 13:00:06 2003 @@ -239,7 +239,7 @@ #define ll_alloc_task_struct() ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) #define ll_free_task_struct(p) free_pages((unsigned long)(p),1) -struct thread_info *alloc_thread_info(void) +struct thread_info *alloc_thread_info(struct task_struct *task) { struct thread_info *thread = NULL; diff -Nru a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h --- a/include/asm-alpha/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-alpha/thread_info.h Mon Sep 22 13:00:06 2003 @@ -51,7 +51,7 @@ /* Thread information allocation. */ #define THREAD_SIZE (2*PAGE_SIZE) -#define alloc_thread_info() \ +#define alloc_thread_info(tsk) \ ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h --- a/include/asm-arm/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-arm/thread_info.h Mon Sep 22 13:00:06 2003 @@ -84,7 +84,7 @@ #define THREAD_SIZE (8192) -extern struct thread_info *alloc_thread_info(void); +extern struct thread_info *alloc_thread_info(struct task_struct *task); extern void free_thread_info(struct thread_info *); #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-h8300/thread_info.h b/include/asm-h8300/thread_info.h --- a/include/asm-h8300/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-h8300/thread_info.h Mon Sep 22 13:00:06 2003 @@ -65,7 +65,7 @@ } /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, 1)) #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h --- a/include/asm-i386/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-i386/thread_info.h Mon Sep 22 13:00:06 2003 @@ -87,7 +87,7 @@ /* thread information allocation */ #define THREAD_SIZE (2*PAGE_SIZE) -#define alloc_thread_info() ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) +#define alloc_thread_info(tsk) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) #define get_thread_info(ti) get_task_struct((ti)->task) #define put_thread_info(ti) put_task_struct((ti)->task) diff -Nru a/include/asm-m68k/thread_info.h b/include/asm-m68k/thread_info.h --- a/include/asm-m68k/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-m68k/thread_info.h Mon Sep 22 13:00:06 2003 @@ -28,10 +28,10 @@ /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */ #if PAGE_SHIFT == 13 /* 8k machines */ -#define alloc_thread_info() ((struct thread_info *)__get_free_pages(GFP_KERNEL,0)) +#define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,0)) #define free_thread_info(ti) free_pages((unsigned long)(ti),0) #else /* otherwise assume 4k pages */ -#define alloc_thread_info() ((struct thread_info *)__get_free_pages(GFP_KERNEL,1)) +#define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,1)) #define free_thread_info(ti) free_pages((unsigned long)(ti),1) #endif /* PAGE_SHIFT == 13 */ diff -Nru a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h --- a/include/asm-m68knommu/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-m68knommu/thread_info.h Mon Sep 22 13:00:06 2003 @@ -65,7 +65,7 @@ } /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, 1)) #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h --- a/include/asm-parisc/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-parisc/thread_info.h Mon Sep 22 13:00:06 2003 @@ -37,7 +37,7 @@ #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) #define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER) -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, THREAD_ORDER)) #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-ppc/thread_info.h b/include/asm-ppc/thread_info.h --- a/include/asm-ppc/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-ppc/thread_info.h Mon Sep 22 13:00:06 2003 @@ -54,7 +54,7 @@ } /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, 1)) #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-ppc64/thread_info.h b/include/asm-ppc64/thread_info.h --- a/include/asm-ppc64/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-ppc64/thread_info.h Mon Sep 22 13:00:06 2003 @@ -52,7 +52,7 @@ #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) #define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER) -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, THREAD_ORDER)) #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h --- a/include/asm-s390/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-s390/thread_info.h Mon Sep 22 13:00:06 2003 @@ -68,7 +68,7 @@ } /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL,THREAD_ORDER)) #define free_thread_info(ti) free_pages((unsigned long) (ti),THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-sparc/thread_info.h b/include/asm-sparc/thread_info.h --- a/include/asm-sparc/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-sparc/thread_info.h Mon Sep 22 13:00:06 2003 @@ -78,7 +78,7 @@ #endif BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info, void) -#define alloc_thread_info() BTFIXUP_CALL(alloc_thread_info)() +#define alloc_thread_info(tsk) BTFIXUP_CALL(alloc_thread_info)() BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) #define free_thread_info(ti) BTFIXUP_CALL(free_thread_info)(ti) diff -Nru a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h --- a/include/asm-sparc64/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-sparc64/thread_info.h Mon Sep 22 13:00:06 2003 @@ -142,10 +142,10 @@ /* thread information allocation */ #if PAGE_SHIFT == 13 -#define alloc_thread_info() ((struct thread_info *)__get_free_pages(GFP_KERNEL, 1)) +#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 1)) #define free_thread_info(ti) free_pages((unsigned long)(ti),1) #else /* PAGE_SHIFT == 13 */ -#define alloc_thread_info() ((struct thread_info *)__get_free_pages(GFP_KERNEL, 0)) +#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 0)) #define free_thread_info(ti) free_pages((unsigned long)(ti),0) #endif /* PAGE_SHIFT == 13 */ diff -Nru a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h --- a/include/asm-um/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-um/thread_info.h Mon Sep 22 13:00:06 2003 @@ -49,7 +49,7 @@ /* thread information allocation */ #define THREAD_SIZE (4*PAGE_SIZE) -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL,2)) #define free_thread_info(ti) free_pages((unsigned long) (ti), 2) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-v850/thread_info.h b/include/asm-v850/thread_info.h --- a/include/asm-v850/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-v850/thread_info.h Mon Sep 22 13:00:06 2003 @@ -54,7 +54,7 @@ */ /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, 1)) #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/include/asm-x86_64/thread_info.h b/include/asm-x86_64/thread_info.h --- a/include/asm-x86_64/thread_info.h Mon Sep 22 13:00:06 2003 +++ b/include/asm-x86_64/thread_info.h Mon Sep 22 13:00:06 2003 @@ -73,7 +73,7 @@ } /* thread information allocation */ -#define alloc_thread_info() \ +#define alloc_thread_info(tsk) \ ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)) #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) diff -Nru a/kernel/fork.c b/kernel/fork.c --- a/kernel/fork.c Mon Sep 22 13:00:06 2003 +++ b/kernel/fork.c Mon Sep 22 13:00:06 2003 @@ -65,15 +65,12 @@ return total; } -#ifdef CONFIG_IA64 -# define HAVE_ARCH_DUP_TASK_STRUCT +#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR +# define alloc_task_struct() kmem_cache_alloc(task_struct_cachep, GFP_KERNEL) +# define free_task_struct(tsk) kmem_cache_free(task_struct_cachep, (tsk)) + static kmem_cache_t *task_struct_cachep; #endif -#ifdef HAVE_ARCH_DUP_TASK_STRUCT -extern void free_task_struct (struct task_struct *tsk); -#else -static kmem_cache_t *task_struct_cachep; - /* * A per-CPU task cache - this relies on the fact that * the very last portion of sys_exit() is executed with @@ -81,7 +78,7 @@ */ static task_t *task_cache[NR_CPUS] __cacheline_aligned; -static void free_task_struct(struct task_struct *tsk) +static void free_task(struct task_struct *tsk) { /* * The task cache is effectively disabled right now. @@ -91,20 +88,19 @@ */ if (tsk != current) { free_thread_info(tsk->thread_info); - kmem_cache_free(task_struct_cachep,tsk); + free_task_struct(tsk); } else { int cpu = get_cpu(); tsk = task_cache[cpu]; if (tsk) { free_thread_info(tsk->thread_info); - kmem_cache_free(task_struct_cachep,tsk); + free_task_struct(tsk); } task_cache[cpu] = current; put_cpu(); } } -#endif /* HAVE_ARCH_DUP_TASK_STRUCT */ void __put_task_struct(struct task_struct *tsk) { @@ -114,7 +110,7 @@ security_task_free(tsk); free_uid(tsk->user); - free_task_struct(tsk); + free_task(tsk); } void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait) @@ -194,7 +190,7 @@ void __init fork_init(unsigned long mempages) { -#ifndef HAVE_ARCH_DUP_TASK_STRUCT +#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR /* create a slab on which task_structs can be allocated */ task_struct_cachep = kmem_cache_create("task_struct", @@ -220,10 +216,6 @@ init_task.rlim[RLIMIT_NPROC].rlim_max = max_threads/2; } -#ifdef HAVE_ARCH_DUP_TASK_STRUCT -extern struct task_struct *dup_task_struct (struct task_struct *orig); -#else /* !HAVE_ARCH_DUP_TASK_STRUCT */ - struct task_struct *dup_task_struct(struct task_struct *orig) { struct task_struct *tsk; @@ -236,13 +228,13 @@ task_cache[cpu] = NULL; put_cpu(); if (!tsk) { - ti = alloc_thread_info(); - if (!ti) + tsk = alloc_task_struct(); + if (!tsk) return NULL; - tsk = kmem_cache_alloc(task_struct_cachep, GFP_KERNEL); - if (!tsk) { - free_thread_info(ti); + ti = alloc_thread_info(tsk); + if (!ti) { + free_task_struct(tsk); return NULL; } } else @@ -258,8 +250,6 @@ return tsk; } -#endif /* !HAVE_ARCH_DUP_TASK_STRUCT */ - #ifdef CONFIG_MMU static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm) { @@ -1063,7 +1053,7 @@ atomic_dec(&p->user->processes); free_uid(p->user); bad_fork_free: - free_task_struct(p); + free_task(p); goto fork_out; }